import Ticket.TrainTicket;
import Ticket.discount.ChildrenDiscountStrategy;
import Ticket.discount.DiscountStrategy;
import Ticket.discount.StudentDiscountStrategy;
public class Main {
    public static void main(String[] args) {
        TrainTicket trainTicket = new TrainTicket();
        trainTicket.setOriginalPrice(200.0);
        DiscountStrategy strategy = new StudentDiscountStrategy();
        trainTicket.setDiscountStrategy(strategy);
        trainTicket.discountCalculate();
        System.out.println("学生票1张，原价为："+trainTicket.getOriginalPrice()+"，打折后价格"+trainTicket.getDiscountPrice());
        strategy = new ChildrenDiscountStrategy();
        trainTicket.setDiscountStrategy(strategy);
        trainTicket.discountCalculate();
        System.out.println("儿童票1张，原价为："+trainTicket.getOriginalPrice()+"，打折后价格"+trainTicket.getDiscountPrice());
    }
}